package com.daqsoft.dao;

import com.daqsoft.data.Group;
import com.daqsoft.data.User;
import org.hibernate.Hibernate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import org.springframework.stereotype.Repository;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import java.util.ArrayList;
import java.util.List;

/**
 * 用户数据层
 * @author 周麟东 on 16:31
 */
@Repository
public interface UserDao extends JpaRepository<User,Integer> {


    User findByUsernameAndPassword(String username , String password);
    List<User> findByUserGroup(Group group);
}
